package tlsx

import (
	"crypto/tls"
	"fmt"
)

const (
// KeyPEM  = `<your key PEM>`
// CertPEM = `<your cert PEM>`
)

func TlsCfg(suits ...string) *tls.Config {
	//tls.LoadX509KeyPair(c, k)
	cert, err := tls.X509KeyPair([]byte(CertPEM), []byte(KeyPEM))
	if err != nil {
		fmt.Println(err.Error())
	}
	cfg := tls.Config{
		InsecureSkipVerify: true,
		MinVersion:         tls.VersionTLS13,
		Certificates:       []tls.Certificate{cert},
		NextProtos:         suits,
	}
	return &cfg
}
